<?php

namespace backend\models;

use Yii;
use common\models\UserInfo;
use yii\helpers\ArrayHelper;
use yii\db\ActiveRecord;
use backend\models\Qr;
use backend\models\PayTrade;

class UserCoupon extends \yii\db\ActiveRecord
{
	public $grPBrandHead;
    /**
     * @inheritdoc
     */
    public static function tableName()
    {
        return 'user_coupon';
    }

    /**
     * @inheritdoc
     */
    public function rules()
    {    	
        return [
            [['id','uid','coupon_id','start_time','end_time','state','useing_time','action_id','from_uid'], 'integer'],
            [['action','url'], 'string', 'max' => 24],
        	[['price'],'number']	 ,
        ];
    }
    /**
     * @inheritdoc
     */
    public function attributeLabels()
    {
        return [
            'id' => 'ID',
            'uid' => Yii::t('app','使用者'),
            'coupon_id' => Yii::t('app','优惠券id'),
            'start_time' => Yii::t('app','开始时间'),
            'end_time' => Yii::t('app','结束时间'),
            'state' => Yii::t('app','使用状态'),
            'useing_time' => Yii::t('app','使用时间'),
        ];
    }
    
}
